Cytosim  PI
Cytoskeleton Simulator
Solver Namespace Reference

Templated iterative solvers for systems of linear equations. More...

Classes

class  Allocator
 allocates vectors of real More...
 
class  Monitor
 records the number of iterations, and the convergence More...
 

Functions

template<typename LinearOperator , typename Monitor , typename Allocator >
void BCGS (const LinearOperator &mat, const real *rhs, real *x, Monitor &monitor, Allocator &allocator)
 Bi-Conjugate Gradient Stabilized without Preconditionning.
 
template<typename LinearOperator , typename Monitor , typename Allocator >
void BCGSP (const LinearOperator &mat, const real *rhs, real *x, Monitor &monitor, Allocator &allocator)
 Bi-Conjugate Gradient Stabilized with Preconditionning.
 

Detailed Description

The linear system (and the preconditionner) is defined by class LinearOperator:

class LinearOperator
{
public:
unsigned int size() const;
void multiply(const real*, real*) const;
void transMultiply(const real*, real*) const;
void precondition(const real*, real*) const;
};

The iterative solver is followed by class Monitor, where the desired convergence criteria can be specified. Monitor will also keep track of iteration counts. An suitable implementation of Monitor is given here.

F. Nedelec, 27.03.2012 - 21.02.2013